<template>
<!-- 封装底部导航 -->
  <footer>
      <router-link class="center" active-class="active" v-for="item in imgArr" :key="item.path" :to="item.path" >
        <img :src="item.select_img" v-if="$route.path == item.path" alt="">
        <img :src="item.no_select_img" v-else alt="">
        <div class="text">{{item.text}}</div>
      </router-link>
</footer>
</template>

<script>
export default {
    props:["imgArr"]
}
</script>

<style scoped>
footer {
  width: 100vw;
  display: flex;
  position: fixed;
  left: 0;
  bottom: 0;
  height: 0.9rem;
  background-color: #ccc;
  text-align: center;
  line-height: 0.8rem;
   border-top: 0.01rem solid #666;
}
footer a {
  flex: 1;
  text-align: center;
  color: #000;
}
.active {
  color: #ff4400;
}

.center{
  text-align: center;
}
footer a img{
  width: 0.35rem;
  height: 0.35rem;
  margin-top: 5px;
}

footer a .text {
  line-height: 30px;
  margin-top: -20px;

}

</style>